<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>根据 HTML 数字字符串解码成字符</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-decode-mimeheader.html">mb_decode_mimeheader</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mb-detect-encoding.html">mb_detect_encoding</a></div>
 <div class="up"><a href="ref.mbstring.html">多字节字符串 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.mb-decode-numericentity" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_decode_numericentity</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5)</p><p class="refpurpose"><span class="refname">mb_decode_numericentity</span> &mdash; <span class="dc-title">根据 HTML 数字字符串解码成字符</span></p>

 </div>
   
 <div class="refsect1 description" id="refsect1-function.mb-decode-numericentity-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>mb_decode_numericentity</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$str</code></span>
   , <span class="methodparam"><span class="type">array</span> <code class="parameter">$convmap</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$encoding</code></span>
   )</div>

  <p class="para rdfs-comment">
   将数字<span class="type"><span class="type 字符串">字符串</span></span>的引用<em><code class="parameter">str</code></em> 按指定的字符块转换成字符串。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-decode-numericentity-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">str</code></em></dt>

     <dd>

      <p class="para">
       要解码的 <span class="type"><a href="language.types.string.html" class="type string">string</a></span>。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">convmap</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">convmap</code></em> 是一个 <span class="type"><a href="language.types.array.html" class="type array">array</a></span>，指定了要转换的代码区域。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">encoding</code></em></dt>

     <dd>

      <p class="para"><em><code class="parameter">encoding</code></em>
参数为字符编码。如果省略，则使用内部字符编码。</p>
     </dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.mb-decode-numericentity-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   转换后的<span class="type"><span class="type 字符串">字符串</span></span>。
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.mb-decode-numericentity-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2639">
    <p><strong>Example #1 <em><code class="parameter">convmap</code></em> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$convmap&nbsp;</span><span style="color: #007700">=&nbsp;array&nbsp;(<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;start_code1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;end_code1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;offset1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;mask1</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;start_code2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;end_code2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;offset2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;mask2</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;........<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">int&nbsp;start_codeN</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;end_codeN</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;offsetN</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">int&nbsp;maskN&nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&nbsp;Specify&nbsp;Unicode&nbsp;value&nbsp;for&nbsp;start_codeN&nbsp;and&nbsp;end_codeN<br />//&nbsp;Add&nbsp;offsetN&nbsp;to&nbsp;value&nbsp;and&nbsp;take&nbsp;bit-wise&nbsp;'AND'&nbsp;with&nbsp;maskN,&nbsp;<br />//&nbsp;then&nbsp;convert&nbsp;value&nbsp;to&nbsp;numeric&nbsp;string&nbsp;reference.<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mb-decode-numericentity-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.mb-encode-numericentity.html" class="function" rel="rdfs-seeAlso">mb_encode_numericentity()</a> - Encode character to HTML numeric string reference</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-decode-mimeheader.html">mb_decode_mimeheader</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mb-detect-encoding.html">mb_detect_encoding</a></div>
 <div class="up"><a href="ref.mbstring.html">多字节字符串 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
